function modifyPassword() {
	var oldkey = $('input[name="oldkey"]').val();
	var newkey = $('input[name="newkey"]').val();
	var comfirmkey = $('input[name="comfirmkey"]').val();
	
	var username = $('span[id="username-show"]').text();
	var role = $('span[id="userrole-show"]').text();
	//alert(username+";"+role);
	
	if(oldkey == null || oldkey == ""|| newkey ==null || newkey =="") {
		alert("密码不能为空！");
	}else {
	   if(newkey != comfirmkey) {
		  alert("两次密码输入不正确，请重新输入！");
	   } else {
		    $.post("jsp/account/editPassword.jsp","oldkey="+oldkey+"&newkey="+newkey+"&comfirmkey="+comfirmkey+"&username="+username+"&role="+role,function(data){
			json = eval('(' + data + ')');
			var res = json.result;
			//alert(res);
			if(res=="success") {
				alert("修改成功");
				window.location.href = "login.jsp";
			} else if(res == "failp") {
				alert("原始密码不正确！");
			} else {
				alert("修改失败！");
			}
		});
	}
  }
};






